﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace Simple
{
    public partial class Form1 : Form
    {
        private AsmDotNet.ASM _asm;

        public Form1()
        {
            InitializeComponent();
            _asm = new AsmDotNet.ASM();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                var b = new Bitmap(openFileDialog1.FileName);
                var f = _asm.Find(b);

                pictureBox1.Image = radioButton1.Checked ? f.DrawLines(b) : f.DrawText(b);
            }
        }
    }
}
